* (bug 13793) Special:Whatlinkshere filters wrong - after paginating instead of before
authorVictor Vasiliev <vasilievvv@users.mediawiki.org>
Sat, 19 Apr 2008 16:46:45 +0000 (16:46 +0000)
committerVictor Vasiliev <vasilievvv@users.mediawiki.org>
Sat, 19 Apr 2008 16:46:45 +0000 (16:46 +0000)
RELEASE-NOTES
includes/SpecialWhatlinkshere.php

index af5c250..cdb80f5 100644 (file)
@@ -206,7 +206,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * Do not display empty columns on Special:UserRights if all groups are
   changeable or all unchangeable
 * Fix fatal error on calling PAGESINCATEGORY with invalid category name
-
+* (bug 13793) Special:Whatlinkshere filters wrong - after paginating instead of before
 
 === API changes in 1.13 ===
 
index e3bb530..4441507 100644 (file)
@@ -99,6 +99,11 @@ class WhatLinksHerePage {
                        'pl_namespace' => $target->getNamespace(),
                        'pl_title' => $target->getDBkey(),
                );
+               if( $this->hideredirs ) {
+                       $plConds['page_is_redirect'] = 0;
+               } elseif( $this->hidelinks ) {
+                       $plConds['page_is_redirect'] = 1;
+               }
 
                $tlConds = array(
                        'page_id=tl_from',
@@ -220,11 +225,6 @@ class WhatLinksHerePage {
 
                $wgOut->addHTML( $this->listStart() );
                foreach ( $rows as $row ) {
-                       if( $this->hideredirs && $row->page_is_redirect )
-                               continue;
-                       if( $this->hidelinks && ( !$row->page_is_redirect && !$row->is_template ) )
-                               continue;
-
                        $nt = Title::makeTitle( $row->page_namespace, $row->page_title );
 
                        $wgOut->addHTML( $this->listItem( $row, $nt ) );